Skip to content

Conversation

@rachelmcr
Copy link
Contributor

Closes: #8137

Description

This PR updates the navigation after tapping the products onboarding banner CTA. Now we start the product creation flow immediately, without navigating to the Products tab first.

Changes

  • Adds a PassthroughSubject to the dashboard view model (addProductTrigger), used to trigger the add product flow when the CTA is tapped.
  • Adds the onProductCreated() callback to the product form view model, which is called when a new product is added so we can clear and resync the dashboard banner.
  • Removes the code for MainTabBarController.presentAddProductFlow() that's no longer needed.

Testing

Because the banner is currently in an experiment, the easiest way to test it is to first comment out the experiment check:

guard ABTest.productsOnboardingBanner.variation == .treatment(nil) else {
return
}

Then proceed with testing:

  1. Build and run the app.
  2. Select a store with no products.
  3. On the My Store screen, tap the "Add a Product" button on the onboarding banner. Confirm a bottom sheet appears to start the add product flow without changing screens.
  4. Check the console and confirm the analytics event product_list_add_product_button_tapped was tracked.
  5. Finish adding a product, and save it as a draft or publish it.
  6. Go back and confirm you are returned to the My Store screen and the banner is gone.

Note: If you go back without saving or publishing the product, you can see you are returned to the My Store screen and the banner is still visible.

Screenshots

Tapping the banner CTA without product templates enabled:

BannerCTANav-NoTemplate.mp4

Tapping the banner CTA with product templates enabled:

BannerCTANav-WithTemplate.mp4

Submitter Checklist

Update release notes:

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@rachelmcr rachelmcr added the feature: products onboarding Related to onboarding new users to manage products label Nov 16, 2022
@rachelmcr rachelmcr added this to the 11.3 milestone Nov 16, 2022
@peril-woocommerce
Copy link

Warnings
⚠️ This PR is assigned to a milestone which is closing in less than 2 days Please, make sure to get it merged by then or assign it to a later expiring milestone

Generated by 🚫 dangerJS

@wpmobilebot
Copy link
Collaborator

You can test the changes from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr8140-5ffc0a3 on your iPhone

If you need access to App Center, please ask a maintainer to add you.

Copy link
Contributor

@Ecarrion Ecarrion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks and works good! 🚀

I would have chosen a simple callback closure rather than an Subject as they are lighter and easier to manage but I see that it looks more consistent with the DashboardViewModelstyle so ✅

@rachelmcr rachelmcr merged commit 333957c into trunk Nov 17, 2022
@rachelmcr rachelmcr deleted the issue/8137-update-banner-cta-navigation branch November 17, 2022 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: products onboarding Related to onboarding new users to manage products

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Products Onboarding: Update navigation after tapping the banner CTA

4 participants